-- find the longest [===[ or ]=====] type sequence and make sure that
-- we use one that's longer.
local str="X"
for str2 in string.gmatch(input,"[%[%]]=*[%[%]]") do
if #str < #str2 then str = str2 end
end
str=string.rep("=",#str-1)
--[[ FIXME:
<?xml version="1.0" encoding="charset" standalone="yes" ?> is still a problem. The closing '?>' needs to be printed using '?<?vlc print ">" ?>' to prevent a parse error.
--]]
local code0 = string.gsub(input,escape(close_tag)," print(["..str.."[")
local code1 = string.gsub(code0,escape(open_tag),"]"..str.."]) ")
local code = "print(["..str.."["..code1.."]"..str.."])"
--[[ Uncomment to debug
if string.match(filename,"vlm_cmd.xml$") then
io.write(code)
io.write("\n")
end
--]]
return assert(loadstring(code,filename))
end
function process(filename)
local mtime = 0 -- vlc.net.stat(filename).modification_time
local func = false -- process_raw(filename)
return function(...)
local new_mtime = vlc.net.stat(filename).modification_time
<h1>Error loading ]]..url..[[</h1><pre>]]..(config.no_error_detail and "Remove configuration option `no_error_detail' on the server to get more information." or tostring(msg))..[[</pre>